import request from '@/utils/request'

// 查询请假申请列表
export function listAskLeave(query) {
  return request({
    url: '/system/askLeave/list',
    method: 'get',
    params: query
  })
}

// 查询请假申请详细
export function getAskLeave(id) {
  return request({
    url: '/system/askLeave/' + id,
    method: 'get'
  })
}

// 新增请假申请
export function addAskLeave(data) {
  return request({
    url: '/system/askLeave',
    method: 'post',
    data: data
  })
}

// 修改请假申请
export function updateAskLeave(data) {
  return request({
    url: '/system/askLeave',
    method: 'put',
    data: data
  })
}

// 删除请假申请
export function delAskLeave(id) {
  return request({
    url: '/system/askLeave/' + id,
    method: 'delete'
  })
}
